package com.zh.media.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zh.web.domain.media.entity.WorkInfo;

import java.util.Set;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zh
 * @since 2024-10-02
 */

public interface WorkInfoMapper extends BaseMapper<WorkInfo> {

    WorkInfo getByArticleIdAndUserId(Long articleId, Long userId);

    Integer selectPraiseCount(Long id);

    boolean updateWorkInfo(WorkInfo updateWorkInfo);

    Integer selectCollectCount(Long id);

    Integer selectViewCount(Long id);

    Integer selectShareCount(Long id);

    Set<String> getCollectSet(Long worksId);

    Set<String> getPriseSet(Long worksId);

    WorkInfo selectByIdAndUserId(Long id, Long userId);
}
